package com.teddy.view.tree;

import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

public abstract class SemanticTreeItem extends TreeItem{
	
	protected String selectedLanguage;
	
	public SemanticTreeItem(TreeItem parent, int style) {
		super(parent, style);
	}
	
	public SemanticTreeItem(Tree parent, int style) {
		super(parent, style);
	}

	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	} 
	
	public TreeItem getItem(int index) {
		return (TreeItem)super.getItem(index);
	}
	
	public abstract void expand() throws Exception;
	public abstract void refresh() throws Exception;
	public abstract void remove() throws Exception;
	public abstract void rename() throws Exception;

	public void setSelectedLanguage(String selectedLanguage) {
		this.selectedLanguage = selectedLanguage;
	}

	public String getSelectedLanguage() {
		return selectedLanguage;
	}
}
